package com.laow.action;

import com.laow.entity.EbookEntry;
import com.laow.service.EbookService;
import com.opensymphony.xwork2.ActionSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;


/**
 * 数据传输页面
 */
@Controller
public class ShowAction extends ActionSupport {

    @Autowired
    @Qualifier("ebookServiceImpl")
    private EbookService ebookService;

    private int entId;    // 根据id进行查询

    private EbookEntry entrys;   // 图书信息

    public String showEntryData(){
        entrys = ebookService.ebookEntryToId(entId);
        System.out.println(entrys+"=============");
        return "success";
    }

    public int getEntId() {
        return entId;
    }

    public void setEntId(int entId) {
        this.entId = entId;
    }

    public EbookEntry getEntrys() {
        return entrys;
    }

    public void setEntrys(EbookEntry entrys) {
        this.entrys = entrys;
    }
}
